package com.atguigu.tingshu.account.service;

import com.atguigu.tingshu.model.account.UserAccount;
import com.atguigu.tingshu.model.account.UserAccountDetail;
import com.atguigu.tingshu.vo.account.AccountLockVo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import java.math.BigDecimal;

public interface UserAccountService extends IService<UserAccount> {


    void initUserAccount(Long userId);

    BigDecimal getAvailableAmount(Long userId);


    /**
     * 根据用户Id 获取到可用余额对象
     * @param userId
     * @return
     */
    UserAccount getUserAccountByUserId(Long userId);

    void checkAndDeduct(AccountLockVo accountDeductVo);

}
